package by.qizer.supercamp.service;

import by.qizer.supercamp.dao.AutoDAO;
import by.qizer.supercamp.domain.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Pribytkoyski Alexey
 *         User: qizer
 *         Date: 04.04.12
 */

@Service
public class AutoServiceImpl implements AutoService {

    @Autowired
    private AutoDAO autoDAO;

    @Transactional
    public void addAuto(Auto auto) {
        autoDAO.addAuto(auto);
    }

    @Transactional
    public List<Auto> listAuto() {
        return autoDAO.listAuto();
    }

    @Transactional
    public void removeAuto(Integer id) {
        autoDAO.removeAuto(id);
    }
}
